//
//  FirstCollectionViewCell.m
//  LOLVideoPlayer
//
//  Created by SXW on 16/3/26.
//  Copyright © 2016年 盛宣伟. All rights reserved.
//

#import "FirstCollectionViewCell.h"
static CGFloat CELL_HEIGHT = 100;

@interface FirstCollectionViewCell ()


@end

@implementation FirstCollectionViewCell

- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self)
    {
        _imageV  = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, [[UIScreen mainScreen] bounds].size.width / 2 - 15, 100)];
        [self.contentView addSubview:_imageV];
        
        _contentLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, CGRectGetMaxY(_imageV.frame), [[UIScreen mainScreen] bounds].size.width / 2 - 15, 40)];
        _contentLabel.font = [UIFont systemFontOfSize:14];
        _contentLabel.numberOfLines = 0;
        [self.contentView addSubview:_contentLabel];
        
        _dateLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, CGRectGetMaxY(_contentLabel.frame)+ 5, 60, 10)];
        _dateLabel.font = [UIFont systemFontOfSize:12];
        [self.contentView addSubview:_dateLabel];
        
        _timeLabel = [[UILabel alloc] initWithFrame:CGRectMake(140, CGRectGetMaxY(_contentLabel.frame)+ 5, 100, 10)];
        _timeLabel.font = [UIFont systemFontOfSize:12];
        [self.contentView addSubview:_timeLabel];
    }
    return self;
}


-(void)configData:(FirstModel *)dataModel{
    
    [_imageV sd_setImageWithURL:[NSURL URLWithString:dataModel.img] placeholderImage:[UIImage imageNamed:@"default_head"]];
    _contentLabel.text = dataModel.name;
    _dateLabel.text = dataModel.updateTime;
    _timeLabel.text = dataModel.lenght;
}


+(CGFloat)getCellHeight{
    
    return CELL_HEIGHT;
}






@end
